package com.fa4j.product.item.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fa4j.common.data.model.Base;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 实体-商品规格
 *
 * @since 2025-11-22 21:06:24
 */
@Data
@TableName(value = "t_product_item_spec", autoResultMap = true)
@Schema(description = "商品规格")
public class ItemSpec extends Base {

    @TableId(type = IdType.AUTO)
    @Schema(description = "主键")
    private Integer id;

    @Schema(description = "商品ID")
    private Integer itemId;

    @Schema(description = "商品规格名称")
    private String name;

    @Schema(description = "商品规格图片")
    private Long imageId;

    @TableField(exist = false)
    @Schema(description = "商品规格图片")
    private String imageUrl;

    @Schema(description = "商品规格价格")
    private BigDecimal price;

    @Schema(description = "商品规格重量")
    private BigDecimal weight;

    @Schema(description = "商品规格条码")
    private String barcode;

    @TableField(exist = false)
    @Schema(description = "商品规格属性列表")
    private List<ItemAttr> attrList;

    @Schema(description = "操作人ID")
    private Long operatorId;

    @Schema(description = "库存数量")
    private BigDecimal stockQuantity;

}
